﻿
namespace Indeco.G24.Windows.Forms
{
	/// <summary>
	/// This is the abstract edit form for the <see cref="Entities.TinTucDanhMuc"/> entity.
	/// </summary>
	/// <remarks>This class is overwritten by .netTiers at each generation.</remarks>
	[System.ComponentModel.DesignerCategoryAttribute("code")]
	public abstract class TinTucDanhMucEditControlBase : System.Windows.Forms.UserControl
	{
		#region Fields
		
		//private System.Windows.Forms.TableLayoutPanel uxTableLayoutPanel;
		/// <summary>
		/// The ErrorProvider for the Entity;
		/// </summary>
		protected System.Windows.Forms.ErrorProvider uxErrorProvider;
		
		/// <summary>
		/// The BindingSource for the entity.
		///</summary>
		protected System.Windows.Forms.BindingSource uxBindingSource;
						
		
		/// <summary>
		/// TextBox for the IDTinTucDanhMuc property. 
		/// </summary>
		protected System.Windows.Forms.TextBox uxIDTinTucDanhMuc;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the IDTinTucDanhMuc property.
		/// </summary>
		protected System.Windows.Forms.Label uxIDTinTucDanhMucLabel;
		
		/// <summary>
		/// TextBox for the IDTinTucDanhMucCha property. 
		/// </summary>
		protected System.Windows.Forms.TextBox uxIDTinTucDanhMucCha;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the IDTinTucDanhMucCha property.
		/// </summary>
		protected System.Windows.Forms.Label uxIDTinTucDanhMucChaLabel;
		
		/// <summary>
		/// TextBox for the Ten property. 
		/// </summary>
		protected System.Windows.Forms.TextBox uxTen;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the Ten property.
		/// </summary>
		protected System.Windows.Forms.Label uxTenLabel;
		
		/// <summary>
		/// TextBox for the SoLienKet property. 
		/// </summary>
		protected System.Windows.Forms.TextBox uxSoLienKet;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the SoLienKet property.
		/// </summary>
		protected System.Windows.Forms.Label uxSoLienKetLabel;
		
		/// <summary>
		/// TextBox for the ViTri property. 
		/// </summary>
		protected System.Windows.Forms.TextBox uxViTri;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the ViTri property.
		/// </summary>
		protected System.Windows.Forms.Label uxViTriLabel;
		
		/// <summary>
		/// TextBox for the NhaCungCap property. 
		/// </summary>
		protected System.Windows.Forms.TextBox uxNhaCungCap;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the NhaCungCap property.
		/// </summary>
		protected System.Windows.Forms.Label uxNhaCungCapLabel;
		
		/// <summary>
		/// CheckBox for the TrangThai property.
		/// </summary>
		protected System.Windows.Forms.CheckBox uxTrangThai;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the TrangThai property.
		/// </summary>
		protected System.Windows.Forms.Label uxTrangThaiLabel;
		
		/// <summary>
		/// DataTimePicker for the ThoiDiemChinhSua property.
		/// </summary>
		protected System.Windows.Forms.DateTimePicker uxThoiDiemChinhSua;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the ThoiDiemChinhSua property.
		/// </summary>
		protected System.Windows.Forms.Label uxThoiDiemChinhSuaLabel;
		
		/// <summary>
		/// DataTimePicker for the ThoiDiemCapNhat property.
		/// </summary>
		protected System.Windows.Forms.DateTimePicker uxThoiDiemCapNhat;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the ThoiDiemCapNhat property.
		/// </summary>
		protected System.Windows.Forms.Label uxThoiDiemCapNhatLabel;
		#endregion
		
		#region Main entity
		private Entities.TinTucDanhMuc _TinTucDanhMuc;
		/// <summary>
		/// Gets or sets the <see cref="Entities.TinTucDanhMuc"/> entity to edit with this form.
		/// </summary>
		/// <value>The <see cref="Entities.TinTucDanhMuc"/> instance.</value>
		public Entities.TinTucDanhMuc TinTucDanhMuc
		{
			get {return this._TinTucDanhMuc;}
			set
			{
				this._TinTucDanhMuc = value;
				if (value != null) 
				{
					this.uxBindingSource.DataSource = value;
					BindControls();
				}			
				
			}
		}
		#endregion
		
		/// <summary>
		/// Binds the controls.
		/// </summary>
		private void BindControls()
		{
			this.uxIDTinTucDanhMuc.DataBindings.Clear();
			this.uxIDTinTucDanhMuc.DataBindings.Add("Text", this.uxBindingSource, "IDTinTucDanhMuc", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
			this.uxIDTinTucDanhMucCha.DataBindings.Clear();
			this.uxIDTinTucDanhMucCha.DataBindings.Add("Text", this.uxBindingSource, "IDTinTucDanhMucCha", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
			this.uxTen.DataBindings.Clear();
			this.uxTen.DataBindings.Add("Text", this.uxBindingSource, "Ten", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
			this.uxSoLienKet.DataBindings.Clear();
			this.uxSoLienKet.DataBindings.Add("Text", this.uxBindingSource, "SoLienKet", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
			this.uxViTri.DataBindings.Clear();
			this.uxViTri.DataBindings.Add("Text", this.uxBindingSource, "ViTri", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
			this.uxNhaCungCap.DataBindings.Clear();
			this.uxNhaCungCap.DataBindings.Add("Text", this.uxBindingSource, "NhaCungCap", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
			this.uxTrangThai.DataBindings.Clear();
			this.uxTrangThai.DataBindings.Add("Checked", this.uxBindingSource, "TrangThai", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
			this.uxThoiDiemChinhSua.DataBindings.Clear();
			this.uxThoiDiemChinhSua.DataBindings.Add("Value", this.uxBindingSource, "ThoiDiemChinhSua", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
			this.uxThoiDiemCapNhat.DataBindings.Clear();
			this.uxThoiDiemCapNhat.DataBindings.Add("Value", this.uxBindingSource, "ThoiDiemCapNhat", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
		}					
		
		#region Constructor
		
		/// <summary>
		/// Initializes a new instance of the <see cref="TinTucDanhMucEditControlBase"/> class.
		/// </summary>
		public TinTucDanhMucEditControlBase()
		{
			InitializeComponent();			
			
			this.uxBindingSource.CurrentItemChanged += new System.EventHandler(uxBindingSource_currentItemChanged);
		}		
		
		/// <summary>
		/// 
		/// </summary>
		private void uxBindingSource_currentItemChanged(object sender, System.EventArgs e)
		{
			if (_TinTucDanhMuc != null) _TinTucDanhMuc.Validate();
		}	
				
		/// <summary>
		/// Initializes the component.
		/// </summary>
		public void InitializeComponent()
		{
			this.components = new System.ComponentModel.Container();
			this.uxErrorProvider = new System.Windows.Forms.ErrorProvider(this.components);
			this.uxBindingSource = new System.Windows.Forms.BindingSource(this.components);
			
			//this.uxTableLayoutPanel = new System.Windows.Forms.TableLayoutPanel();
			this.uxIDTinTucDanhMuc = new System.Windows.Forms.TextBox();
			uxIDTinTucDanhMucLabel = new System.Windows.Forms.Label();
			this.uxIDTinTucDanhMucCha = new System.Windows.Forms.TextBox();
			uxIDTinTucDanhMucChaLabel = new System.Windows.Forms.Label();
			this.uxTen = new System.Windows.Forms.TextBox();
			uxTenLabel = new System.Windows.Forms.Label();
			this.uxSoLienKet = new System.Windows.Forms.TextBox();
			uxSoLienKetLabel = new System.Windows.Forms.Label();
			this.uxViTri = new System.Windows.Forms.TextBox();
			uxViTriLabel = new System.Windows.Forms.Label();
			this.uxNhaCungCap = new System.Windows.Forms.TextBox();
			uxNhaCungCapLabel = new System.Windows.Forms.Label();
			this.uxTrangThai = new System.Windows.Forms.CheckBox();
			uxTrangThaiLabel = new System.Windows.Forms.Label();
			this.uxThoiDiemChinhSua = new System.Windows.Forms.DateTimePicker();
			uxThoiDiemChinhSuaLabel = new System.Windows.Forms.Label();
			this.uxThoiDiemCapNhat = new System.Windows.Forms.DateTimePicker();
			uxThoiDiemCapNhatLabel = new System.Windows.Forms.Label();
			
			((System.ComponentModel.ISupportInitialize)(this.uxBindingSource)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.uxErrorProvider)).BeginInit();
			this.SuspendLayout();
			
			// 
			// uxTableLayoutPanel
			// 
			//this.uxTableLayoutPanel.AutoSize = true;
			//this.uxTableLayoutPanel.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
			//this.uxTableLayoutPanel.ColumnCount = 2;
			//this.uxTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 120F));
			//this.uxTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 250F));
			//this.uxTableLayoutPanel.Location = new System.Drawing.System.Drawing.Point(3, 3);
			//this.uxTableLayoutPanel.Name = "uxTableLayoutPanel";
			//this.uxTableLayoutPanel.RowCount = 2;
			//this.uxTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F));
			//this.uxTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F));
			//this.uxTableLayoutPanel.Size = new System.Drawing.Size(450, 50);
			//this.uxTableLayoutPanel.TabIndex = 0;
			
			//
			// uxErrorProvider
			//
			this.uxErrorProvider.ContainerControl = this;
			this.uxErrorProvider.DataSource = this.uxBindingSource;
			
			//
			// uxIDTinTucDanhMucLabel
			//
			this.uxIDTinTucDanhMucLabel.Text = "IDTinTucDanhMuc:";
			this.uxIDTinTucDanhMucLabel.Location = new System.Drawing.Point(3, 0);
			this.Controls.Add(this.uxIDTinTucDanhMucLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxIDTinTucDanhMucLabel);			
			//
			// uxIDTinTucDanhMuc
			//
			//this.uxTableLayoutPanel.Controls.Add(this.uxIDTinTucDanhMuc);
			this.uxIDTinTucDanhMuc.Location = new System.Drawing.Point(160, 0);
			this.Controls.Add(this.uxIDTinTucDanhMuc);
			//
			// uxIDTinTucDanhMucChaLabel
			//
			this.uxIDTinTucDanhMucChaLabel.Text = "IDTinTucDanhMucCha:";
			this.uxIDTinTucDanhMucChaLabel.Location = new System.Drawing.Point(3, 26);
			this.Controls.Add(this.uxIDTinTucDanhMucChaLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxIDTinTucDanhMucChaLabel);			
			//
			// uxIDTinTucDanhMucCha
			//
			//this.uxTableLayoutPanel.Controls.Add(this.uxIDTinTucDanhMucCha);
			this.uxIDTinTucDanhMucCha.Location = new System.Drawing.Point(160, 26);
			this.Controls.Add(this.uxIDTinTucDanhMucCha);
			//
			// uxTenLabel
			//
			this.uxTenLabel.Text = "Ten:";
			this.uxTenLabel.Location = new System.Drawing.Point(3, 52);
			this.Controls.Add(this.uxTenLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxTenLabel);			
			//
			// uxTen
			//
			this.uxTen.Width = 250;
			this.uxTen.MaxLength = 300;
			//this.uxTableLayoutPanel.Controls.Add(this.uxTen);
			this.uxTen.Location = new System.Drawing.Point(160, 52);
			this.Controls.Add(this.uxTen);
			//
			// uxSoLienKetLabel
			//
			this.uxSoLienKetLabel.Text = "SoLienKet:";
			this.uxSoLienKetLabel.Location = new System.Drawing.Point(3, 78);
			this.Controls.Add(this.uxSoLienKetLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxSoLienKetLabel);			
			//
			// uxSoLienKet
			//
			//this.uxTableLayoutPanel.Controls.Add(this.uxSoLienKet);
			this.uxSoLienKet.Location = new System.Drawing.Point(160, 78);
			this.Controls.Add(this.uxSoLienKet);
			//
			// uxViTriLabel
			//
			this.uxViTriLabel.Text = "ViTri:";
			this.uxViTriLabel.Location = new System.Drawing.Point(3, 104);
			this.Controls.Add(this.uxViTriLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxViTriLabel);			
			//
			// uxViTri
			//
			//this.uxTableLayoutPanel.Controls.Add(this.uxViTri);
			this.uxViTri.Location = new System.Drawing.Point(160, 104);
			this.Controls.Add(this.uxViTri);
			//
			// uxNhaCungCapLabel
			//
			this.uxNhaCungCapLabel.Text = "NhaCungCap:";
			this.uxNhaCungCapLabel.Location = new System.Drawing.Point(3, 130);
			this.Controls.Add(this.uxNhaCungCapLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxNhaCungCapLabel);			
			//
			// uxNhaCungCap
			//
			this.uxNhaCungCap.Width = 250;
			this.uxNhaCungCap.MaxLength = 25;
			//this.uxTableLayoutPanel.Controls.Add(this.uxNhaCungCap);
			this.uxNhaCungCap.Location = new System.Drawing.Point(160, 130);
			this.Controls.Add(this.uxNhaCungCap);
			//
			// uxTrangThaiLabel
			//
			this.uxTrangThaiLabel.Text = "TrangThai:";
			this.uxTrangThaiLabel.Location = new System.Drawing.Point(3, 156);
			this.Controls.Add(this.uxTrangThaiLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxTrangThaiLabel);			
			//
			// uxTrangThai
			//
			//this.uxTableLayoutPanel.Controls.Add(this.uxTrangThai);
			this.uxTrangThai.Location = new System.Drawing.Point(160, 156);
			this.Controls.Add(this.uxTrangThai);
			//
			// uxThoiDiemChinhSuaLabel
			//
			this.uxThoiDiemChinhSuaLabel.Text = "ThoiDiemChinhSua:";
			this.uxThoiDiemChinhSuaLabel.Location = new System.Drawing.Point(3, 182);
			this.Controls.Add(this.uxThoiDiemChinhSuaLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxThoiDiemChinhSuaLabel);			
			//
			// uxThoiDiemChinhSua
			//
			//this.uxTableLayoutPanel.Controls.Add(this.uxThoiDiemChinhSua);
			this.uxThoiDiemChinhSua.Location = new System.Drawing.Point(160, 182);
			this.Controls.Add(this.uxThoiDiemChinhSua);
			//
			// uxThoiDiemCapNhatLabel
			//
			this.uxThoiDiemCapNhatLabel.Text = "ThoiDiemCapNhat:";
			this.uxThoiDiemCapNhatLabel.Location = new System.Drawing.Point(3, 208);
			this.Controls.Add(this.uxThoiDiemCapNhatLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxThoiDiemCapNhatLabel);			
			//
			// uxThoiDiemCapNhat
			//
			//this.uxTableLayoutPanel.Controls.Add(this.uxThoiDiemCapNhat);
			this.uxThoiDiemCapNhat.Location = new System.Drawing.Point(160, 208);
			this.Controls.Add(this.uxThoiDiemCapNhat);
			// 
			// TinTucDanhMucEditControlBase
			// 
			this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
			this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
			//this.Controls.Add(this.uxTableLayoutPanel);
			this.AutoScroll = true;
			this.Name = "TinTucDanhMucEditControlBase";
			this.Size = new System.Drawing.Size(478, 311);
			//this.Localizable = true;
			((System.ComponentModel.ISupportInitialize)(this.uxErrorProvider)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.uxBindingSource)).EndInit();			
			this.ResumeLayout(false);
			this.PerformLayout();
		}
		#endregion
				
		#region ComboBox List
		
		
		#endregion
		
		/// <summary> 
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.IContainer components = null;

		/// <summary> 
		/// Clean up any resources being used.
		/// </summary>
		/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
		protected override void Dispose(bool disposing)
		{
			if (disposing && (components != null))
			{
				components.Dispose();
			}
			base.Dispose(disposing);
		}
	}
}
